//
//  ViewController.h
//  IVBricker
//
//  Created by 이 상돈 on 11. 10. 24..
//  Copyright (c) 2011년 미니게이트. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <QuartzCore/CADisplayLink.h>

#define BRICKS_WIDTH 5
#define BRICKS_HEIGHT 4

@interface ViewController : UIViewController
{
	int score;
	int lives;
	float touchOffset;
	BOOL isPlaying;
	
	UILabel *scoreLabel;
	UILabel *livesLabel;
	UILabel *messageLabel;
	
	UIImageView *ball;
	UIImageView *paddle;
	UIImageView *bricks[BRICKS_WIDTH][BRICKS_HEIGHT];
	
	CADisplayLink *theTimer;
	NSString *brickTypes[4];
	
	CGPoint ballMovement;
}

@property (nonatomic, retain) IBOutlet UILabel *scoreLabel;
@property (nonatomic, retain) IBOutlet UILabel *livesLabel;
@property (nonatomic, retain) IBOutlet UILabel *messageLabel;

@property (nonatomic, retain) IBOutlet UIImageView *ball;
@property (nonatomic, retain) IBOutlet UIImageView *paddle;

- (void)initializeTimer;
- (void)animateBall:(NSTimer *)theTimer;
- (void)startPlaying;
- (void)pauseGame;
- (void)initializeBricks;
- (void)processCollision:(UIImageView *)brick;

@end
